/**
 * 
 */
package com.jolestar.yayaweibotong.dao;

import java.io.Serializable;

import com.google.appengine.api.datastore.Entity;
import com.google.appengine.repackaged.org.json.JSONException;
import com.google.appengine.repackaged.org.json.JSONObject;
import com.jolestar.yayaweibotong.ServiceType;
import com.jolestar.yayaweibotong.YayaException;

/**
 * @author jolestar@gmail.com
 *
 */
public class RetweetDomain extends AbstractDomain implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 775437712001740124L;
	public static final String USER_SCREEN_NAME_PROPERTY ="user_screen_name";
	public static final String USER_NAME_PROPERTY ="user_name";
	public static final String STATUS_PROPERTY ="status";
	public static final String TEXT_PROPERTY ="text";
	public static final String THUMBNAIL_PIC_PROPERTY = "thumbnail_pic";
	public static final String BMIDDLE_PIC_PROPERTY = "bmiddle_pic";
	public static final String ORIGINAL_PIC_PROPERTY = "original_pic";
	public static final String ORIGINAL_PIC_SHORT_URL_PROPERTY = "original_pic_short_url";

	public RetweetDomain(ServiceType serviceType,StatusDomain status,long id, String userName, String userScreenName,
			String text) {
		super(serviceType,Long.toString(id));
		this.set(STATUS_PROPERTY, status.getKey());
		this.set(USER_NAME_PROPERTY, userName);
		this.set(USER_SCREEN_NAME_PROPERTY, userScreenName);
		this.set(TEXT_PROPERTY, text);
	}

	public RetweetDomain(Entity entity) {
		super(entity);
	}


	public String getUserScreenName() {
		return this.get(USER_SCREEN_NAME_PROPERTY);
	}

	public String getUserName() {
		return this.get(USER_NAME_PROPERTY);
	}

	public String getText() {
		return this.get(TEXT_PROPERTY);
	}

	public String getThumbnailPic() {
		return this.get(THUMBNAIL_PIC_PROPERTY);
	}

	public void setThumbnailPic(String img) {
		this.set(THUMBNAIL_PIC_PROPERTY, img);
	}

	public String getBmiddlePic() {
		return this.get(BMIDDLE_PIC_PROPERTY);
	}

	public void setBmiddlePic(String img) {
		this.set(BMIDDLE_PIC_PROPERTY, img);
	}

	public void setOriginalPic(String img) {
		this.set(ORIGINAL_PIC_PROPERTY, img);
	}

	public String getOriginalPic() {
		return this.get(ORIGINAL_PIC_PROPERTY);
	}

	public void setOriginalPicShortUrl(String url) {
		this.set(ORIGINAL_PIC_SHORT_URL_PROPERTY, url);
	}

	public String getOriginalPicShortUrl() {
		return this.get(ORIGINAL_PIC_SHORT_URL_PROPERTY);
	}

}
